public class Vehicle {
    private int wheels; //车轮数
    private double weight; //车载重
    //无参构造
    public Vehicle() {
        this(0, 0.0);
    }
    //有参构造
    public Vehicle(int wheels, double weight) {
        this.weight = weight;
        this.wheels = wheels;
    }
    //wheels的set函数
    public void setWheels(int wheels) {
        this.wheels = wheels;
    }
    //weights的set函数
    public void setWeight(double weight) {
        this.weight = weight;
    }
    //输出函数
    public void Print() {
        System.out.println("车载重为" + weight + "吨");
        System.out.println("车轮数为" + wheels + "个");
    }

}
